package com.zjff.myshop.admin.pojo.form;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
public class UserQueryPageForm {
    @NotNull(message = "page不能为空")
    @Min(value = 1, message = "page不能小于1")
    @ApiModelProperty(value = "页码", position = 1, required = true)
    private Integer page;

    @NotNull(message = "limit不能为空")
    @Range(min = 5, max = 50, message = "limit必须在5~50之间")
    @ApiModelProperty(value = "每页记录数", position = 2, required = true)
    private Integer limit;

    @ApiModelProperty(value = "关键字", position = 3)
    private String keyword;

    @ApiModelProperty(value = "排序", position = 4)
    private String orderBy;
}
